namespace SimpleSpreadsheet.Core.Expressions
{
    /// <summary>
    /// Represents an unary expression
    /// </summary>
    public class UnaryExpression : BaseExpression
    {
        public UnaryExpression(UnaryExpressionType type, BaseExpression expression)
        {
            Type = type;
            Expression = expression;
        }

        public BaseExpression Expression { get; set; }
        public UnaryExpressionType Type { get; set; }

        public override void Accept(ExpressionVisitor visitor)
        {
            visitor.Visit(this);
        }
    }

    public enum UnaryExpressionType
    {
        Not,
        Negate
    }
}